#ifndef POINT_H
#define POINT_H

#include "publicdefinition.h"

class Point
{
public:
    enum PointSiteEnum
    {
        kPointAtLeft = -1,
        kPointOnLine = 0,
        kPointAtRight = 1
    };
public:
    Point();
    Point(double x,double y);
public:
    inline double x() const
    {
        return x_;
    }
    inline double y() const
    {
        return y_;
    }
    inline void set_x(const double x)
    {
        x_ = x;
    }
    inline void set_y(const double y)
    {
        y_ = y;
    }
public:
    bool LessThan(const Point& other) const;
    bool Equal(const Point& other) const;
    Point Clone() const;
    void CopyFrom(const Point &other);
    bool operator <(const Point& other) const
    {
        return LessThan(other);
    }
public:
    static PointSiteEnum PointSite(const Point &p,const Point &line_from,const Point &line_to);
    PointSiteEnum PointSite(const Point &line_from,const Point &line_to);
private:
    double x_;
    double y_;
    //DISALLOW_COPY_AND_ASSIGN(Point);
};

#endif // POINT_H
